package br.com.gaacorp.sai.webapp.action;

import java.io.Serializable;
import java.util.List;

import br.com.gaacorp.sai.webapp.action.BasePage;
import br.com.gaacorp.sai.model.Alternative;
import br.com.gaacorp.sai.service.GenericManager;

public class AlternativeList extends BasePage implements Serializable {
    private GenericManager<Alternative, Long> alternativeManager;

    public void setAlternativeManager(GenericManager<Alternative, Long> alternativeManager) {
        this.alternativeManager = alternativeManager;
    }

    public AlternativeList() {
        setSortColumn("alternativeId"); // sets the default sort column
    }

    public List getAlternatives() {
        return sort(alternativeManager.getAll());
    }
}

